package ru.dc.object.commands;

/**
 * <pre>
 * User: Penkov Vladimir
 * Date: 08.10.2010
 * Time: 17:50:04
 * </pre>
 */
public class Version extends Command {

    public static final  String DEFAULT_VERSION = "1.0091";
    private String version = "1.0091";

    @Override
    public String generateCommand() {
        return getActualCommandName()+" "+ getVersion();
    }

    @Override
    public String getActualCommandName() {
        return "$Version";
    }

    @Override
    public void parseCommand() {
        if (getCommand().length()>9) {
            setVersion(getCommand().substring(9));
        }
        else {
            setVersion(null);
        }
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }
    

}
